package com.yuyue.springFramework.note05.annotation;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.env.Environment;

/**
 * 创建Value填充类
 */
public class ValueEntity {
    //注入配置文件中有的值
    @Value("${test.name}")
    public String i;

    public String n;

    @Autowired
    public Environment environment;

    //注入配置文件中没有的值
    public ValueEntity(@Value("${test.job}")String n) {
        this.n = n;
    }
}
